package Object;

public class Test {

//    public static void eatAnimal(Animal animal){
//        animal.eat();
//
//    }
    public static void main(String[] args) {
//        eatAnimal(new Cat());
//        eatAnimal(new Fish());
//        eatAnimal(new Dog());


        Animal animal = new Animal();
        animal.eat();
        animal = new Cat();
        animal.eat();
        if(animal instanceof Cat){
            Cat cat = (Cat)animal;
            cat.run();
        }


    }
}
